package exce1.exce02;

public class Demo2 {
    private int age;
    public void setAge(int age){
        if (age>0&&age<90){
            this.age=age;
        }else{
            System.out.println("输入年龄有误");
        }
    }
    public int getAge(){
        return age;
    }
}
